import request from '@/utils/request'

const path = '/service/card'

export function fetchList(query) {
  return request({
    url: path,
    method: 'get',
    params: query
  })
}

export function fetchPhysicalCard(id) {
  return request({
    url: path + '/' + id,
    method: 'get'
  })
}

export function generatePhysicalCard(data) {
  return request({
    url: path + '/generate',
    method: 'post',
    data
  })
}

export function modifyServiceCard(data) {
  return request({
    url: path + '/' + data.cardId,
    method: 'post',
    data
  })
}
